<script setup>
import App2 from './App2.vue';

import { inject } from 'vue';
// 通过 inject 获取值
const theme = inject('theme');
</script>

<template>
  <div style="border: 1px solid red; margin: 16px">
    <h2>App1组件</h2>
    <App2></App2>
    {{ theme }}
  </div>
</template>
